<?php
declare(strict_types=1);

namespace Plugin\Alarm\Http\Request\Admin;

use Mine\MineFormRequest;

class RdAlarmDangerTypeRequest extends MineFormRequest
{
    /**
     * 公共规则
     */
    public function rules(): array
    {
        return [
            'name' => 'string|max:255',
            'icon' => 'string|max:255',
            'description' => 'string|max:255',
        ];
    }

    /**
     * 字段映射名称
     * return array
     */
    public function attributes(): array
    {
        return [
            'id' => 'id',
            'name' => '隐患名称',
            'icon' => '隐患图标',
            'description' => '隐患描述',
        ];
    }
}